// @ts-nocheck
import React from 'react';
import { ApplyPluginsType, dynamic } from 'C:/Users/86151/Desktop/fu-junnan/项目代码/WIPI/node_modules/umi/node_modules/@umijs/runtime';
import * as umiExports from './umiExports';
import { plugin } from './plugin';
import LoadingComponent from '@/Loading';

export function getRoutes() {
  const routes = [
  {
    "path": "/",
    "component": dynamic({ loader: () => import(/* webpackChunkName: 'layouts__index' */'@/layouts/index.tsx'), loading: LoadingComponent}),
    "routes": [
      {
        "path": "/404",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__404' */'@/pages/404.tsx'), loading: LoadingComponent})
      },
      {
        "path": "/archives",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__archives__index' */'@/pages/archives/index.tsx'), loading: LoadingComponent})
      },
      {
        "path": "/article/:id",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__article__id' */'@/pages/article/[id].tsx'), loading: LoadingComponent})
      },
      {
        "path": "/category/:id",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__category__id' */'@/pages/category/[id].tsx'), loading: LoadingComponent})
      },
      {
        "path": "/",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__index' */'@/pages/index.tsx'), loading: LoadingComponent})
      },
      {
        "path": "/knowledge",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__knowledge__index' */'@/pages/knowledge/index.tsx'), loading: LoadingComponent})
      },
      {
        "path": "/knowledge/:kid",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__knowledge__kid__index' */'@/pages/knowledge/[kid]/index.tsx'), loading: LoadingComponent})
      },
      {
        "path": "/knowledge/:kid/:id",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__knowledge__kid__id' */'@/pages/knowledge/[kid]/[id].tsx'), loading: LoadingComponent})
      },
      {
        "path": "/page/:id",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__page__id' */'@/pages/page/[id].tsx'), loading: LoadingComponent})
      },
      {
        "path": "/tag/:id",
        "exact": true,
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__tag__id' */'@/pages/tag/[id].tsx'), loading: LoadingComponent})
      },
      {
        "component": dynamic({ loader: () => import(/* webpackChunkName: 'p__404' */'@/pages/404.tsx'), loading: LoadingComponent})
      }
    ]
  }
];

  // allow user to extend routes
  plugin.applyPlugins({
    key: 'patchRoutes',
    type: ApplyPluginsType.event,
    args: { routes },
  });

  return routes;
}
